home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / xvisrc.zip / REGEXP.H < prev    next >
C/C++ Source or Header  |  1992-07-28  |  1KB  |  52 lines

  1. /***
  2.  
  3. * @(#)regexp.h    2.1 7/29/92
  4.  
  5. * program name:
  6.     xvi
  7. * function:
  8.     PD version of UNIX "vi" editor, with extensions.
  9. * module name:
  10.     regexp.h
  11. * module function:
  12.     Definitions for regular expression routines.
  13.  
  14. * history:
  15.     Regular expression routines by Henry Spencer.
  16.     Modfied for use with STEVIE (ST Editor for VI Enthusiasts,
  17.      Version 3.10) by Tony Andrews.
  18.     Adapted for use with Xvi by Chris & John Downey.
  19.     Original copyright notice is in regexp.c.
  20.     Please note that this is a modified version.
  21. ***/
  22.  
  23. /*
  24.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  25.  * not the System V one.
  26.  */
  27.  
  28. #define NSUBEXP 10
  29. typedef struct regexp {
  30.     char    *startp[NSUBEXP];
  31.     char    *endp[NSUBEXP];
  32.     char    regstart;        /* Internal use only. */
  33.     char    reganch;        /* Internal use only. */
  34.     char    *regmust;        /* Internal use only. */
  35.     int     regmlen;        /* Internal use only. */
  36.     char    program[1];        /* Unwarranted chumminess with compiler. */
  37. } regexp;
  38.  
  39. #ifndef P
  40. #   include "xvi.h"
  41. #endif
  42.  
  43. /* regerror.c */
  44. extern    void    regerror P((char *s));
  45.  
  46. /* regexp.c */
  47. extern    regexp    *regcomp P((char *exp));
  48. extern    int    regexec P((regexp *prog, char *string, int at_bol));
  49.  
  50. /* regsub.c */
  51. extern void    regsub P((regexp *prog, char *source, char *dest));
  52.